1. Technical Field of the Invention
The present invention relates to a digital clamping circuit and a digital clamping method for correcting the black level of an imaging signal in an electronic camera.
2. Description of the Related Art
Conventionally, electronic cameras that capture an image of an object with image-capturing elements or the like have been used, and such electronic cameras perform black-level correction to determine brightness for a captured image.
DC components of an output signal vary due to variations in power-supply voltage or temperature of image-capturing elements or an analog front-end (AFE) circuit. Thus, with respect to the variation of the DC components, the black-level correction is a process for invariably making the black level (DC components) constant.
Techniques described in Japanese Unexamined Patent Application Publications Nos. 62-117480 and 5-153428 are known as being relevant to a black-level correction method.
A typical black-level correction method which has been conventionally used will be described below.
First, a sensor including a group of image-capturing elements is shielded against light so that no light enters peripheral portions thereof. Then, an average value of sensor outputs from the regions (light-shielding regions) in which light-shielding is provided is determined so as to serve as a reference value, and a sensor-output value of a region (light-receiving region) in which no light-shielding is provided is compared with the reference value to determine the brightness of the light-receiving regions.
At this point, since the sensor outputs of the light shielding regions vary due to a power-supply voltage, temperature, or the like, a correction device (a black-level correction device) for performing correction (black-level correction) on the sensor outputs of the light shielding regions are generally used.
FIG. 5 is a diagram of a known black-level correction device 100 that is provided in an electronic camera. Referring to FIG. 5, the black-level correction device 100 includes an OB clamping circuit (optical black clamping circuit) 101, a PGA (programmable gain amplifier) 102, an ADC (analog-to-digital converter) 103, an LPF (low-pass filter) 104, a black-level correction unit 105, a DAC (digital-to-analog converter) 106, and a digital clamping circuit 107.
In FIG. 5, a section that is constituted by the OB clamping circuit 101, the PGA 102, the ADC 103, and the DAC 106 will be called an analog front-end circuit (hereinafter referred to as an “AFE circuit”) 100a. A section that is constituted by the LPF 104 and the black-level correction unit 105 will be called an OB clamping controller 100b. 
An output signal from a sensor is input to the black-level correction device 100 shown in FIG. 5, and the OB clamping circuit 101 adds the sensor output to a correction value input from the DAC 106. This correction value is determined to have a value such that an output signal from the PGA 102 can effectively utilize the dynamic range of the ADC 103.
The PGA 102 then amplifies an output signal of the OB clamping circuit 101 in accordance with a predetermined gain and the ADC 103 converts the amplified signal into a digital signal. This digital signal is fed back to correct the black level.
The fed-back digital signal is input to the LPF 104, and, when a digital signal corresponding to a sensor output of a light-shielding region is input, the LPF 104 averages the digital signal.
The black-level correction unit 105 determines the difference between a digital signal output from the LPF 104 and a black-level target value (hereinafter referred to as an “OB target value”) and outputs a correction value in accordance with the determined difference. Herein, the OB target value is a pre-set constant value or is appropriately determined by a microcomputer or the like.
Further, the correction value is input to the DAC 106 and the DAC 106 converts the correction value into an analog signal and outputs the signal to the OB clamping circuit 101.
The digital clamping circuit 107 also subtracts the correction value from the digital signal output from the ADC 103 and outputs the resulting signal as an output signal of the black-level correction device 100. Herein, the correction value that is subtracted may be externally given or may be internally determined. When the value is internally determined, it equals the average value (i.e., black level) of an output signal of the light-shielding region.
In the known black-level correction device 100, however, the black level in the AFE circuit 100a may be offset too high for the convenience of processing at the AFE circuit 100a. For example, for the purpose of using a region in which the linearity is favorable (a linear region) in the input/output characteristic of the PGA 102 in the AFE circuit 100a, the processing may be performed with the black level being increased by a predetermined value.
In this case, the offset amount of black level is subtracted by the digital clamping circuit 107 and a value less than the offset amount is clipped to “0” and is caused to serve as an output signal.
In such a case, since the dynamic range of a video signal is reduced by the offset amount of the black level, there is a problem in that a dynamic range that is inherently provided in the device cannot be effectively used.
An object of the present invention is to provide a digital clamping circuit and a digital clamping method which can effectively use the dynamic range of an output signal in black-level correction.